<template>
  <!-- 检查不合格/  复查合格/不合格 -->
  <div class="noDetailsGooverModal" style="position: relative">
    <div class="details-content">
      <top-title :updateTime="false" :content="content" :titleColor="'#1388FF'"></top-title>
      <div class="add-btn cursor" @click="$router.go(-1)" style="right: 1.1rem">返回</div>
      <div class="add-btn cursor" @click="downloadHandle('all')" v-has="'goover:beDown'">下载PDF</div>

      <div class="details-table detailModal" style="margin-top: 20px">
        <!-- 企业信息 -->
        <div class="common-title">
          <div class="icon"></div>
          <div class="content">企业信息</div>
        </div>
        <div class="content-wrapper">
          <div class="flex">
            <div class="info-wrap f1">
              <div class="label common-lable">单位名称</div>
              <a-tooltip placement="topLeft">
                <template slot="title">
                  <span>{{ policeCheckTaskInfo.companyMessageName || '暂无' }} </span>
                </template>
                <div class="value common-value">{{ policeCheckTaskInfo.companyMessageName || '暂无' }}</div>
              </a-tooltip>
            </div>
            <div class="info-wrap f1">
              <div class="label common-lable">所属行业</div>
              <a-tooltip placement="topLeft">
                <template slot="title">
                  <span>{{ policeCheckTaskInfo.industryInformationName || '暂无' }} </span>
                </template>
                <div class="value common-value">{{ policeCheckTaskInfo.industryInformationName || '暂无' }}</div>
              </a-tooltip>
            </div>
          </div>
          <div class="flex">
            <div class="info-wrap f1">
              <div class="label common-lable">统一社会信用代码</div>
              <a-tooltip placement="topLeft">
                <template slot="title">
                  <span>{{ policeCheckTaskInfo.companyCreditCode || '暂无' }} </span>
                </template>
                <div class="value common-value">{{ policeCheckTaskInfo.companyCreditCode || '暂无' }}</div>
              </a-tooltip>
            </div>
            <div class="info-wrap f1">
              <div class="label common-lable">责任民警</div>
              <a-tooltip placement="topLeft">
                <template slot="title">
                  <span>{{ policeCheckTaskInfo.companyPoliceUserName || '暂无' }} </span>
                </template>
                <div class="value common-value">{{ policeCheckTaskInfo.companyPoliceUserName || '暂无' }}</div>
              </a-tooltip>
            </div>
          </div>
          <div class="flex">
            <div class="info-wrap f1">
              <div class="label common-lable">企业法人</div>
              <a-tooltip placement="topLeft">
                <template slot="title">
                  <span>{{ policeCheckTaskInfo.companyLegalPersonName || '暂无' }} </span>
                </template>
                <div class="value common-value">{{ policeCheckTaskInfo.companyLegalPersonName || '暂无' }}</div>
              </a-tooltip>
            </div>
            <div class="info-wrap f1">
              <div class="label common-lable">法人联系方式</div>
              <a-tooltip placement="topLeft">
                <template slot="title">
                  <span>{{ policeCheckTaskInfo.companyLegalMobile || '暂无' }} </span>
                </template>
                <div class="value common-value">{{ policeCheckTaskInfo.companyLegalMobile || '暂无' }}</div>
              </a-tooltip>
            </div>
          </div>
          <div>
            <div class="info-wrap f1">
              <div class="label common-lable">营业地址</div>
              <a-tooltip placement="topLeft">
                <template slot="title">
                  <span>{{ policeCheckTaskInfo.companyAddressDetail || '暂无' }} </span>
                </template>
                <div class="value common-value">{{ policeCheckTaskInfo.companyAddressDetail || '暂无' }}</div>
              </a-tooltip>
            </div>
          </div>
        </div>

        <!-- 检查信息 -->
        <div class="common-title">
          <div class="icon"></div>
          <div class="content">检查信息</div>
        </div>
        <div class="content-wrapper">
          <div class="flex">
            <div class="f1">
              <div class="info-wrap f1">
                <div class="label common-lable">检查民警</div>
                <div class="value common-value">{{ policeCheckTaskInfo.policeUserName || '暂无' }}</div>
              </div>
              <div class="info-wrap f1">
                <div class="label common-lable">警号</div>
                <div class="value common-value">{{ policeCheckTaskInfo.policeUserNo || '暂无' }}</div>
              </div>
              <div class="info-wrap f1">
                <div class="label common-lable">辅警</div>
                <div class="value common-value">
                  {{ policeCheckTaskInfo.policeCheckTaskAuxiliaryInfoList[0].policeUserName || '暂无' }}
                </div>
              </div>
              <div class="info-wrap f1">
                <div class="label common-lable">检查类型</div>
                <div class="value common-value">{{ policeCheckTaskInfo.industryExamineName || '暂无' }}</div>
              </div>
              <div class="info-wrap f1">
                <div class="label common-lable">检查/复查</div>
                <div class="value common-value">
                  {{ policeCheckTaskInfo.checkType == 1 ? '检查' : '复查' || '暂无' }}
                </div>
              </div>
            </div>
            <div class="police-wrap f1">
              <div class="label common-lable">民警签到图</div>
              <div class="value common-value" @click="showImg(policeCheckTaskInfo.signPicture)">
                <img
                  class="cusImg"
                  :id="`${policeCheckTaskInfo.signPicture}`"
                  :src="`${imgPrefix + policeCheckTaskInfo.signPicture}`"
                  :data-original="`${imgPrefix + policeCheckTaskInfo.signPicture}`"
                />
              </div>
            </div>
          </div>
          <div class="info-wrap f1">
            <div class="label common-lable">检查时间</div>
            <div class="value common-value">{{ policeCheckTaskInfo.checkTime || '暂无' }}</div>
          </div>

          <!-- 这里是循环  start -->
          <block v-for="item2 in policeCheckCategoryInfoList" :key="item2.id">
            <block v-for="itemNext in item2.policeCheckDetailInfoList" :key="item2.id + itemNext.sortOrder">
              <div>
                <div class="info-wrap f1">
                  <div class="label common-lable yellowWrite">不合格项{{ itemNext.frontNum }}</div>
                  <a-tooltip placement="topLeft">
                    <template slot="title">
                      <span>{{ itemNext.industryExamineDetailName || '暂无' }} </span>
                    </template>
                    <div class="value common-value yellowWrite">{{ itemNext.industryExamineDetailName || '暂无' }}</div>
                  </a-tooltip>
                </div>
              </div>
              <div>
                <div class="info-wrap f1">
                  <div class="label common-lable">所属分类</div>
                  <a-tooltip placement="topLeft">
                    <template slot="title">
                      <span>{{ item2.industryExamineCategoryName || '暂无' }} </span>
                    </template>
                    <div class="value common-value">{{ item2.industryExamineCategoryName || '暂无' }}</div>
                  </a-tooltip>
                </div>
              </div>
              <div>
                <div class="info-wrap f1 text-con">
                  <div class="textLabel">法律依据</div>
                  <div class="textValue">
                    <block v-for="(regInfo, index) in itemNext.regulationsInfoList" :key="index">
                      <div>《{{ regInfo.regulationsName }}》-{{ regInfo.regulationsArticleNo }}</div>
                      <div v-html="regInfo.regulationsArticleContent"></div>
                    </block>
                  </div>
                </div>
              </div>
              <div>
                <div class="info-wrap f1">
                  <div class="label common-lable">文字证据</div>
                  <a-tooltip placement="topLeft">
                    <template slot="title">
                      <span>{{ itemNext.checkMemo || '暂无' }} </span>
                    </template>
                    <div class="value common-value">{{ itemNext.checkMemo || '暂无' }}</div>
                  </a-tooltip>
                </div>
              </div>
              <div class="proof-wrap f1">
                <div class="label common-lable">图片证据</div>
                <div class="value common-value">
                  <block v-for="(failedimg, i) in itemNext.failedImageInfoList" :key="failedimg.path">
                    <img
                      :id="`${failedimg.path}`"
                      :src="`${imgPrefix + failedimg.path}`"
                      alt=""
                      @click="showImg(failedimg.path)"
                      :style="{ margin: i == 1 ? '0 12px' : '' }"
                      :data-original="`${imgPrefix + failedimg.path}`"
                    />
                  </block>
                </div>
              </div>
            </block>
          </block>
          <!-- 这里是循环  end -->

          <div class="flex">
            <div class="f1">
              <div class="info-wrap f1">
                <div class="label common-lable">检查结果</div>
                <div class="value common-value">{{ policeCheckTaskInfo.checkResultName || '暂无' }}</div>
              </div>
              <div class="info-wrap f1">
                <div class="label common-lable">处罚结果</div>
                <div class="value common-value">{{ policeCheckUnqualifiedInfo.rectificationTypeName || '暂无' }}</div>
              </div>
              <div class="info-wrap f1">
                <div class="label common-lable">企业回执截止日期</div>
                <div class="value common-value">{{ policeCheckUnqualifiedInfo.penaltyEndTime || '暂无' }}</div>
              </div>
              <div class="info-wrap f1">
                <div class="label common-lable">电子公文</div>
                <div
                  class="value common-value"
                  style="color: #47e829; cursor: pointer"
                  @click="downloadHandle('only', 1)"
                >
                  查看
                </div>
              </div>
            </div>
            <div class="police-wrap f1">
              <div class="label common-lable" style="height: 184px; line-height: 184px">责任人签名</div>
              <div class="value common-value" style="height: 184px; line-height: 184px; background-color: #d3d3d3">
                <img :src="`${imgPrefix + policeCheckTaskInfo.principalSignatureUrl}`" alt="" />
              </div>
            </div>
          </div>
          <div class="flex">
            <div class="info-wrap f1">
              <div class="label common-lable">回执提交时间</div>
              <a-tooltip placement="topLeft">
                <template slot="title">
                  <span>{{ policeCheckUnqualifiedInfo.receiptTime || '暂无' }} </span>
                </template>
                <div class="value common-value">{{ policeCheckUnqualifiedInfo.receiptTime || '暂无' }}</div>
              </a-tooltip>
            </div>
            <div class="info-wrap f1">
              <div class="label common-lable">回执是否逾期</div>
              <a-tooltip placement="topLeft">
                <template slot="title">
                  <span>{{ policeCheckUnqualifiedInfo.isReceiptOverdue == 1 ? '是' : '否' || '暂无' }} </span>
                </template>
                <div class="value common-value">
                  {{ policeCheckUnqualifiedInfo.isReceiptOverdue == 1 ? '是' : '否' || '暂无' }}
                </div>
              </a-tooltip>
            </div>
          </div>
          <div class="proof-wrap f1">
            <div class="label common-lable">回执图片</div>
            <div class="value common-value">
              <block v-for="(item, i) in policeCheckUnqualifiedInfo.receiptImageInfoList" :key="item.path">
                <img
                  class="cusImg"
                  :id="`${item.path}`"
                  :src="`${imgPrefix + item.path}`"
                  :data-original="`${imgPrefix + item.path}`"
                  alt=""
                  :style="{ margin: i == 1 ? '0 12px' : '' }"
                  @click="showImg(item.path)"
                />
              </block>
            </div>
          </div>
          <div>
            <div class="info-wrap f1">
              <div class="label common-lable">回执文字</div>
              <a-tooltip placement="topLeft">
                <template slot="title">
                  <span>{{ policeCheckUnqualifiedInfo.receiptContent || '暂无' }} </span>
                </template>
                <div class="value common-value">{{ policeCheckUnqualifiedInfo.receiptContent || '暂无' }}</div>
              </a-tooltip>
            </div>
          </div>
        </div>

        <block v-if="params.checkType != 1">
          <!-- 复查信息 -->
          <div class="common-title">
            <div class="icon"></div>
            <div class="content">复查信息</div>
          </div>

          <!-- 复查信息 （不合格） -->
          <div class="content-wrapper" v-if="params.checkResult == 2">
            <div class="flex">
              <div class="f1">
                <div class="info-wrap f1">
                  <div class="label common-lable">复查民警</div>
                  <div class="value common-value">{{ policeCheckTaskInfoReview.policeUserName || '暂无' }}</div>
                </div>
                <div class="info-wrap f1">
                  <div class="label common-lable">警号</div>
                  <div class="value common-value">{{ policeCheckTaskInfoReview.policeUserNo || '暂无' }}</div>
                </div>
                <div class="info-wrap f1">
                  <div class="label common-lable">复查类型</div>
                  <div class="value common-value">{{ policeCheckTaskInfoReview.industryExamineName || '暂无' }}</div>
                </div>
                <div class="info-wrap f1">
                  <div class="label common-lable">检查/复查</div>
                  <div class="value common-value">
                    {{ policeCheckTaskInfoReview.checkType == 1 ? '检查' : '复查' || '暂无' }}
                  </div>
                </div>
                <div class="info-wrap f1">
                  <div class="label common-lable">复查时间</div>
                  <div class="value common-value">{{ policeCheckTaskInfoReview.checkTime || '暂无' }}</div>
                </div>
              </div>
              <div class="police-wrap f1">
                <div class="label common-lable">民警签到图</div>
                <div class="value common-value" style="background-color: #d3d3d3">
                  <img
                    class="cusImg"
                    :id="`${policeCheckTaskInfoReview.signPicture}`"
                    :src="`${imgPrefix + policeCheckTaskInfoReview.signPicture}`"
                    :data-original="`${imgPrefix + policeCheckTaskInfoReview.signPicture}`"
                    alt=""
                    @click="showImg(policeCheckTaskInfoReview.signPicture)"
                  />
                </div>
              </div>
            </div>

            <!-- 这里是循环  start -->
            <block v-for="item2 in policeCheckCategoryInfoListReview" :key="item2.id">
              <block v-for="itemNext in item2.policeCheckDetailInfoList" :key="item2.id + itemNext.sortOrder">
                <div>
                  <div class="info-wrap f1">
                    <div class="label common-lable yellowWrite">不合格项{{ itemNext.frontNum }}</div>
                    <a-tooltip placement="topLeft">
                      <template slot="title">
                        <span>{{ itemNext.industryExamineDetailName || '暂无' }} </span>
                      </template>
                      <div class="value common-value yellowWrite">
                        {{ itemNext.industryExamineDetailName || '暂无' }}
                      </div>
                    </a-tooltip>
                  </div>
                </div>
                <div>
                  <div class="info-wrap f1">
                    <div class="label common-lable">所属分类</div>
                    <a-tooltip placement="topLeft">
                      <template slot="title">
                        <span>{{ item2.industryExamineCategoryName || '暂无' }} </span>
                      </template>
                      <div class="value common-value">{{ item2.industryExamineCategoryName || '暂无' }}</div>
                    </a-tooltip>
                  </div>
                </div>
                <div>
                  <div class="info-wrap f1 text-con">
                    <div class="textLabel">法律依据</div>
                    <div class="textValue">
                      <block v-for="(regInfo, index) in itemNext.regulationsInfoList" :key="index">
                        <div>《{{ regInfo.regulationsName }}》-{{ regInfo.regulationsArticleNo }}</div>
                        <div v-html="regInfo.regulationsArticleContent"></div>
                      </block>
                    </div>
                  </div>
                </div>
                <div>
                  <div class="info-wrap f1">
                    <div class="label common-lable">文字证据</div>
                    <a-tooltip placement="topLeft">
                      <template slot="title">
                        <span>{{ itemNext.checkMemo || '暂无' }} </span>
                      </template>
                      <div class="value common-value">{{ itemNext.checkMemo || '暂无' }}</div>
                    </a-tooltip>
                  </div>
                </div>
                <div class="proof-wrap f1">
                  <div class="label common-lable">图片证据</div>
                  <div class="value common-value">
                    <block v-for="failedimg in itemNext.failedImageInfoList" :key="failedimg.path">
                      <img
                        :id="`${failedimg.path}`"
                        :src="`${imgPrefix + failedimg.path}`"
                        :data-original="`${imgPrefix + failedimg.path}`"
                        alt=""
                        @click="showImg(failedimg.path)"
                      />
                    </block>
                  </div>
                </div>
              </block>
            </block>
            <!-- 这里是循环  end -->

            <div class="flex">
              <div class="f1">
                <div class="info-wrap f1">
                  <div class="label common-lable">复查结果</div>
                  <div class="value common-value">{{ policeCheckTaskInfoReview.checkResultName || '暂无' }}</div>
                </div>
                <div class="info-wrap f1">
                  <div class="label common-lable">处罚结果</div>
                  <div class="value common-value">
                    {{ policeCheckUnqualifiedInfoReview.rectificationTypeName || '暂无' }}
                  </div>
                </div>
                <div class="info-wrap f1">
                  <div class="label common-lable">企业回执截止日期</div>
                  <div class="value common-value">{{ policeCheckUnqualifiedInfoReview.penaltyEndTime || '暂无' }}</div>
                </div>
                <div class="info-wrap f1">
                  <div class="label common-lable">电子公文</div>
                  <div
                    class="value common-value"
                    style="color: #47e829; cursor: pointer"
                    @click="downloadHandle('only', 2)"
                  >
                    查看
                  </div>
                </div>
              </div>
              <div class="police-wrap f1">
                <div class="label common-lable" style="height: 184px; line-height: 184px">责任人签名</div>
                <div class="value common-value" style="height: 184px; line-height: 184px; background-color: #d3d3d3">
                  <img :src="`${imgPrefix + policeCheckTaskInfoReview.principalSignatureUrl}`" alt="" />
                </div>
              </div>
            </div>
            <div class="flex">
              <div class="info-wrap f1">
                <div class="label common-lable">回执提交时间</div>
                <a-tooltip placement="topLeft">
                  <template slot="title">
                    <span>{{ policeCheckUnqualifiedInfoReview.receiptTime || '暂无' }} </span>
                  </template>
                  <div class="value common-value">{{ policeCheckUnqualifiedInfoReview.receiptTime || '暂无' }}</div>
                </a-tooltip>
              </div>
              <div class="info-wrap f1">
                <div class="label common-lable">回执是否逾期</div>
                <a-tooltip placement="topLeft">
                  <template slot="title">
                    <span>{{ policeCheckUnqualifiedInfoReview.isReceiptOverdue == 1 ? '是' : '否' || '暂无' }} </span>
                  </template>
                  <div class="value common-value">
                    {{ policeCheckUnqualifiedInfoReview.isReceiptOverdue == 1 ? '是' : '否' || '暂无' }}
                  </div>
                </a-tooltip>
              </div>
            </div>
            <div class="proof-wrap f1">
              <div class="label common-lable">回执图片</div>
              <div class="value common-value">
                <block v-for="(item, i) in policeCheckUnqualifiedInfoReview.receiptImageInfoList" :key="item.path">
                  <img
                    class="cusImg"
                    :id="`${item.path}`"
                    :src="`${imgPrefix + item.path}`"
                    :data-original="`${imgPrefix + item.path}`"
                    alt=""
                    :style="{ margin: i == 1 ? '0 12px' : '' }"
                    @click="showImg(item.path)"
                  />
                </block>
              </div>
            </div>
            <div>
              <div class="info-wrap f1">
                <div class="label common-lable">回执文字</div>
                <a-tooltip placement="topLeft">
                  <template slot="title">
                    <span>{{ policeCheckUnqualifiedInfoReview.receiptContent || '暂无' }} </span>
                  </template>
                  <div class="value common-value">{{ policeCheckUnqualifiedInfoReview.receiptContent || '暂无' }}</div>
                </a-tooltip>
              </div>
            </div>
          </div>

          <!-- 复查信息 （合格） -->
          <div class="content-wrapper" v-if="params.checkResult == 1">
            <div class="flex">
              <div class="f1">
                <div class="info-wrap f1">
                  <div class="label common-lable">检查民警</div>
                  <div class="value common-value">{{ policeCheckTaskInfoReview.policeUserName || '暂无' }}</div>
                </div>
                <div class="info-wrap f1">
                  <div class="label common-lable">警号</div>
                  <div class="value common-value">{{ policeCheckTaskInfoReview.policeUserNo || '暂无' }}</div>
                </div>
                <div class="info-wrap f1">
                  <div class="label common-lable">检查类型</div>
                  <div class="value common-value">{{ policeCheckTaskInfoReview.industryExamineName || '暂无' }}</div>
                </div>
                <div class="info-wrap f1">
                  <div class="label common-lable">检查/复查</div>
                  <div class="value common-value">
                    {{ policeCheckTaskInfoReview.checkType == 1 ? '检查' : '复查' || '暂无' }}
                  </div>
                </div>
                <div class="info-wrap f1">
                  <div class="label common-lable">检查时间</div>
                  <div class="value common-value">{{ policeCheckTaskInfoReview.checkTime || '暂无' }}</div>
                </div>
              </div>
              <div class="police-wrap f1">
                <div class="label common-lable">民警签到图</div>
                <div class="value common-value" style="background-color: #d3d3d3">
                  <img
                    class="cusImg"
                    :id="`${policeCheckTaskInfoReview.signPicture}`"
                    :src="`${imgPrefix + policeCheckTaskInfoReview.signPicture}`"
                    :data-original="`${imgPrefix + policeCheckTaskInfoReview.signPicture}`"
                    alt=""
                    @click="showImg(policeCheckTaskInfoReview.signPicture)"
                  />
                </div>
              </div>
            </div>

            <div class="flex">
              <div class="f1">
                <div class="sign-wrap f1">
                  <div class="label common-lable">检查结果</div>
                  <div class="value common-value" style="padding-left: 16px">
                    {{ policeCheckTaskInfoReview.checkResultName || '暂无' }}
                  </div>
                </div>
              </div>
              <div class="sign-wrap f1">
                <div class="label common-lable">责任人签名</div>
                <div class="value common-value" style="background-color: #d3d3d3">
                  <img :src="`${imgPrefix + policeCheckTaskInfoReview.principalSignatureUrl}`" alt="" />
                </div>
              </div>
            </div>
          </div>
        </block>
      </div>
    </div>

    <img-show ref="imgShow"></img-show>
  </div>
</template>

<script>
import { checkTaskRecord } from '@/api/goover'
import { findEnableDictItemsbyCode } from '@/api/api'
import topTitle from '@/components/topTitle'
import imgShow from '@/components/imgShow'
import Viewer from 'viewerjs'
import 'viewerjs/dist/viewer.css'

export default {
  name: 'noDetailsGooverModal',
  components: { topTitle, imgShow },
  data() {
    return {
      content: [['检查记录'], ['检查详情']],
      params: {},
      policeCheckTaskInfo: {},
      policeCheckUnqualifiedInfo: {},
      policeCheckCategoryInfoList: {},

      // 复查但
      policeCheckTaskInfoReview: {},
      policeCheckCategoryInfoListReview: {},
      policeCheckUnqualifiedInfoReview: {},
      imgPrefix: '',
    }
  },
  created() {
    this.getImagePrefix()
  },
  mounted() {
    if (this.$route.query.records && typeof this.$route.query.records === 'object') {
      this.params = this.$route.query.records
      localStorage.setItem('detailsGooverData', JSON.stringify(this.params)) // 持久化储存 刷新使用
    } else {
      this.params = JSON.parse(localStorage.getItem('detailsGooverData'))
    }

    //检查（不合格）
    if (this.params.checkType == 1) {
      this.checkList()
      return
    }

    this.getDetailList()
  },
  methods: {
    imgDetail(pic) {
      this.$refs.imgShow.show({ type: 'img', src: pic })
    },
    showImg(id) {
      const ViewerDom = document.getElementById(id)
      const viewer = new Viewer(ViewerDom, {
        toolbar: false,
        button: false,
        navbar: false,
        title: false,
        url: 'data-original',
        hide: function () {
          viewer.destroy()
        },
      })
      viewer.show()
    },
    downloadHandle(flag, own) {
      let records = this.params
      sessionStorage.setItem('crmBook', flag) // 是否只展示电子文书模块
      sessionStorage.setItem('ownType', own) //单号类型：检查单/复查单  1/2

      if (flag == 'only') {
        const { href } = this.$router.resolve({
          path: '/goover/modules/belowthemarkPdf',
          query: {
            records,
          },
        })
        window.open(href, '_blank')
        return
      }

      this.$router.push({ path: '/goover/modules/belowthemarkPdf', query: { records } })
    },
    checkList() {
      checkTaskRecord({ taskId: this.params.id }).then((res) => {
        let { policeCheckTaskInfo, policeCheckUnqualifiedInfo, policeCheckCategoryInfoList } = res.result
        this.policeCheckTaskInfo = policeCheckTaskInfo
        this.policeCheckUnqualifiedInfo = policeCheckUnqualifiedInfo
        this.policeCheckCategoryInfoList = this.infoCheck(policeCheckCategoryInfoList)
      })
    },
    getDetailList() {
      // 检查单
      checkTaskRecord({ taskId: this.params.policeCheckTaskId }).then((res) => {
        let { policeCheckTaskInfo, policeCheckUnqualifiedInfo, policeCheckCategoryInfoList } = res.result
        this.policeCheckTaskInfo = policeCheckTaskInfo
        this.policeCheckUnqualifiedInfo = policeCheckUnqualifiedInfo
        this.policeCheckCategoryInfoList = this.infoCheck(policeCheckCategoryInfoList)
      })

      // 复查单
      checkTaskRecord({ taskId: this.params.id }).then((res) => {
        let { policeCheckTaskInfo, policeCheckCategoryInfoList, policeCheckUnqualifiedInfo } = res.result
        this.policeCheckTaskInfoReview = policeCheckTaskInfo
        this.policeCheckCategoryInfoListReview = this.infoCheck(policeCheckCategoryInfoList)
        this.policeCheckUnqualifiedInfoReview = policeCheckUnqualifiedInfo
      })
    },
    // 不合格项  排序
    infoCheck(infoList) {
      let num = 1
      for (var i = 0; i < infoList.length; i++) {
        for (var j = 0; j < infoList[i].policeCheckDetailInfoList.length; j++) {
          infoList[i].policeCheckDetailInfoList[j].frontNum = num++
        }
      }

      return infoList
    },
    getImagePrefix() {
      findEnableDictItemsbyCode({ code: 'static_server' }).then((res) => {
        this.imgPrefix = res.result[0].value
      })
    },
  },
}
</script>
<style scoped lang="less">
.noDetailsGooverModal {
  flex: 1;
  min-height: 100%;
  background: var(--theme-content-bg);

  .details-content {
    position: relative;
    margin: 0 auto;
    width: 11rem;
    min-width: 865px;
    background: var(--theme-container-bg);
    padding-bottom: 5px;

    .add-btn {
      top: 0.06rem;
      right: 0;
    }

    .details-table {
      margin: 0 0.2rem;
      margin-top: 20px;
      color: #fff;
      height: calc(100vh - 160px);
      overflow-y: auto;
    }

    .yellowWrite {
      color: #e8b529;
    }
  }

  .cusImg {
    object-fit: cover;
    cursor: pointer;
  }
}
</style>
